package net.zoneland.knowledge.service;

import net.zoneland.knowledge.model.FavoriteVo;
import net.zoneland.knowledge.model.LoginUserPojo;
import net.zoneland.knowledge.model.QaResponse;

/**
 * .
 *
 * @author: bcc
 * 2021/7/9
 */
public interface FavoriteService {

    /**
     * 验证我的收藏是否存在.
     * @param user 用户
     * @param esQuestionId 题库Id
     * @param type 1 收藏 0取消收藏
     * @param category 收藏内容标题分类
     * @return
     */
    String addFavorite(final LoginUserPojo user, final String esQuestionId, final Integer type, String category, final String titleType);

    /**
     * 获取所有收藏内容
     * @param user
     * @return
     */
    FavoriteVo searchFavorite(final LoginUserPojo user);

    /**
     * 查询内容是否收藏
     * @param qaResponse
     * @param user
     * @return
     */
    boolean getFavoriteStatus(final QaResponse qaResponse, final LoginUserPojo user);
}
